#include <QtWidgets>
#include "cg_jeuadversaire.h"
#include "cg_carteadverse.h"

Cg_CarteAdverse::Cg_CarteAdverse() : QGraphicsPixmapItem(), m_place(0), m_jeu(0)
{
    QPixmap carte;
    carte.load(":/images/Dos de Carte (Govi).png");
    setPixmap(carte);
    setTransformationMode(Qt::SmoothTransformation);
    setFlag(QGraphicsItem::ItemSendsGeometryChanges);
}

Cg_CarteAdverse::Cg_CarteAdverse(Cg_JeuAdversaire *jeu) : QGraphicsPixmapItem(), m_place(0), m_jeu(jeu)
{
    jeu->ajouterCarte(this,false);
    setZValue(m_place);
    QPixmap carte;
    carte.load(":/images/Dos de Carte (Govi).png");
    setPixmap(carte);
    setTransformationMode(Qt::SmoothTransformation);
    setFlag(QGraphicsItem::ItemSendsGeometryChanges);
}

Cg_CarteAdverse::Cg_CarteAdverse(Cg_JeuAdversaire *jeu, int place) : QGraphicsPixmapItem(), m_place(place), m_jeu(jeu)
{
    jeu->ajouterCarte(this,false);
    setZValue(m_place);
    QPixmap carte;
    carte.load(":/images/Dos de Carte (Govi).png");
    setPixmap(carte);
    setTransformationMode(Qt::SmoothTransformation);
    setFlag(QGraphicsItem::ItemSendsGeometryChanges);
}

void Cg_CarteAdverse::setPlace(int place)
{
    m_place = place;
}

void Cg_CarteAdverse::setJeu(Cg_JeuAdversaire *jeu)
{
    m_jeu = jeu;
}

int Cg_CarteAdverse::getPlace()
{
    return m_place;
}

Cg_JeuAdversaire* Cg_CarteAdverse::getJeu()
{
    return m_jeu;
}
